import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { BookOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/hire',
    name: 'Hire',
    redirect: '/hire/list',
    component: Layout,
    meta: {
      title: '岗位管理',
      icon: renderIcon(BookOutlined),
      hidden: true,
      sort: 2,
    },
    children: [
      {
        path: 'list',
        name: 'hire-list',
        meta: {
          title: '岗位列表',
        },
        component: () => import('@/views/hire/index.vue'),
      },
      {
        path: 'info/:id?',
        name: 'hire-info',
        meta: {
          title: '岗位详情',
          hidden: true,
          activeMenu: 'hire-list',
        },
        component: () => import('@/views/hire/info.vue'),
      },
    ],
  },
];

export default routes;
